package com.fit.service;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import com.fit.interfaces.Employer;

public class EmployersBean implements Employers {

	private Map<String, Employer> employers = new HashMap<String, Employer>();
	
	/* (non-Javadoc)
	 * @see com.fit.service.Employer#retrive()
	 */
	public Collection<Employer> retrive(){
		return employers.values();
	}
	/* (non-Javadoc)
	 * @see com.fit.service.Employer#save(com.fit.interfaces.Employer)
	 */
	public Employer save(Employer employer){
		return employers.put(employer.getName(), employer);
	}
	/* (non-Javadoc)
	 * @see com.fit.service.Employer#retriveSingleEmployer(java.lang.String)
	 */
	public Employer retriveSingleEmployer(String name){
		return employers.get(name);
	}
	
}
